(function() {
  var Argv, config, initConfig;

  Argv = require('optimist').argv;

  config = {
    debug: true,
    server: {
      port: 10000,
      staticPrefix: '/static'
    },
    redis: {
      host: '127.0.0.1',
      port: 10010
    },
    mongo: {
      host: '127.0.0.1',
      port: 10020,
      poolSize: 16
    },
    session: {
      key: 'vicanso',
      secret: 'justakeyforvicanso',
      maxAge: 60 * 60 * 1000
    }
  };

  initConfig = function(config) {
    if (Argv.port != null) {
      config.server.port = Argv.port;
    }
    if (process.env.NODE_ENV === 'production') {
      return config.debug = false;
    }
  };

  initConfig(config);

  module.exports = config;

}).call(this);
